#******************************************************************
#
# Copyright 2015 Samsung Electronics All Rights Reserved.
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Import('env')

mediator_env = env.Clone()

target_os = env.get('TARGET_OS')

######################################################################
# Build flags
######################################################################
mediator_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
mediator_env.AppendUnique(CPPDEFINES = ['TB_LOG'])

mediator_env.PrependUnique(CPPPATH = [
			env.get('SRC_DIR') + '/resource/csdk/ocmalloc/include',		
			env.get('SRC_DIR') + '/resource/csdk/connectivity/common/inc',
			env.get('SRC_DIR') + '/resource/csdk/connectivity/api',
			env.get('SRC_DIR') + '/resource/csdk/stack/include',
			env.get('SRC_DIR') + '/resource/csdk/logger/include',
			env.get('SRC_DIR') + '/resource/csdk/security/include',
			env.get('SRC_DIR') + '/extlibs/cjson',
			env.get('SRC_DIR') + '/service/easy-setup/sdk/mediator/inc',
			env.get('SRC_DIR') + '/service/easy-setup/sdk/common'])

mediator_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction', 'coap', 'ESSDKLibrary'])

mediator = mediator_env.Program('mediator', 'mediator.cpp')

i_mediator = mediator_env.Install(env.get('BUILD_DIR'), mediator)

Alias('mediator', i_mediator)
env.AppendTarget('mediator')
